package com.bear.atlassianmcp.jira.config;

import com.bear.atlassianmcp.jira.mcp.tools.*;
import com.bear.atlassianmcp.oauth.mcp.tools.OAuthManagementTools;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Jira 工具回调提供者配置
 * 包含所有 Jira 相关的 MCP 工具和 OAuth 管理工具
 */
@Configuration
public class JiraToolCallbackProvider {

    @Bean
    public ToolCallbackProvider jiraTools(IssueTools issueTools, ProjectTools projectTools,
                                          SearchTools searchTools, AttachmentTools attachmentTools,
                                          OAuthManagementTools oauthManagementTools) {
        return MethodToolCallbackProvider.builder()
                .toolObjects(issueTools, projectTools, searchTools, attachmentTools, oauthManagementTools)
                .build();
    }
}
